#ifndef  _DATABASE_H_
#define  _DATABASE_H_

typedef struct data
{

	char  sn[64];
	char  time[64];
	float temp;
}st_data;

int database_open(sqlite3 **db, char *fliename);

int database_insert_data( sqlite3 *db, char *data);//存入数据库	

int database_query_data(sqlite3 *db, char  *buff);//从数据库中获取数据

int database_delete_data(sqlite3 *db);//删除数据库

int database_get_id( sqlite3 *db);//存入数据库	

int database_save_server( sqlite3 *db, char *data_buff);	

int database_get_count(sqlite3 *db);
#endif
